organization
as a Google Account belonging to a company (e.g., Company A). This account may have several users
(Company A employees). A document
will be any file created within the organization (e.g., document, spreadsheet, slides, etc.). A location
will be any child section within the document (e.g., slide within a presentation).organizationId
and also add it to the auth token.setDocuments
method, where you can pass a folderId
to specify the folder you want to subscribe to.
If you want to subscribe to all documents in a folder, you can set the allDocuments
flag to true
. This will automatically subscribe you to all the documents in the folder, and you will receive real-time updates for all of them.
If you only want to subscribe to a specific set of documents within a folder, you can pass an array of document objects to the setDocuments
method, along with the folderId
.
setDocuments
method.
organizationId
or folderId
with pagination.
Document ID
can see each other’s Presence
, Cursors
, Comments
etc.
For example, in a slide presentation application, the entire slide deck is a document.
documentId
: The unique identifier for the document.metadata
: (optional) This is a key/value pair object where you can set metadata about the document such as documentName
. documentName is a special field that we use to display the document name in some Velt Components.documents
: Document[]options?
: SetDocumentsRequestOptionsdata-velt-document-id
attribute to the container that contains the document
.DocumentMetadata
object.organizationId
of the target document in the document metadata.id
(required): A unique identifier for the location that can be used to reference it laterlocationName
(recommended): A human-readable name displayed in Velt components like the VeltCommentsSideBar
version
(optional): An object with id
and name
fields to track different versions of the locationlocations
Add a root location
Add additional locations
true
parameter:Bind element containers to locations
location
by adding the data-velt-location-id
attribute.
User
represents a person who has been authenticated with the Velt SDK.
Once a User
has been authenticated, their profile can be seen within Velt’s collaboration features.
For example in the Comments
feature, the User's
name is shown by their comment and in @mentions
.
Additionally in the Presence
and in Cursors
features, the User's
name is shown by their avatar bubble and mouse cursors.
@mention
other users. By default, the contact list for the @mention
feature includes users from:
@here
: This is a special group that includes only the users explicitly added on the document. This doesn’t include organization users or organization user groups.identify()
method with the userId
and authToken
as described here.
User
has been authenticated, their profile can be seen within Velt’s collaboration features.
For example in the Comments feature, the User’s name is shown by their comment and in @mentions
.
Additionally in the Presence and in Cursors features, the User’s name is shown by their avatar bubble and mouse cursors.
identify
method with forceReset
option set to true
.
Learn more here.
identify
method again.
This will ensure we clean up the current user session and start a new session with the new user.
identify
method with forceReset
option set to true
.
Default: false
Folder
and Document
resources.
public
: default
Any user who successfully initializes the given Velt resource can access the resource data whether or not they are part of the resource.organizationPrivate
: All users in the same organization as the resource can access the resource.restricted
: Only users explicitly added to the resource will have access.